package cn.gok.gokhappymall.portal.web;

import cn.gok.gokhappymall.portal.servie.IUserService;
import cn.gok.gokhappymall.util.ResultData;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: chenfan
 * @Description:
 */
@RestController
@RequestMapping("/user")
public class UserController {

    @Autowired
    IUserService userService;

    @RequestMapping("/forget_get_question.do")
    public ResultData forgetGetQuestion(String username){
        ResultData resultData = userService.forgetGetQuestion(username);
        return resultData;
    }

    @RequestMapping("/forget_check_answer.do")
    public ResultData forgetCheckAnswer(String username,String question, String answer){
        ResultData resultData = userService.forgetCheckAnswer(username,question,answer);
        return resultData;
    }



    @RequestMapping("/forget_reset_password.do")
    public ResultData forgetResetPassword(String username,String passwordNew, String forgetToken){
        ResultData resultData = userService.forgetResetPassword(username, passwordNew, forgetToken);
        return resultData;
    }


}
